package com.ruoyi.inventory.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 备件对象 t_sp_part
 *
 * @author ruoyi
 * @date 2025-09-26
 */
public class TSpPart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 备件编码(主键) */
    private String partNo;

    /** 原主键（用于编辑时更改主键） */
    private String oldPartNo;

    /** 备件名称 */
    @Excel(name = "备件名称")
    private String name;

    /** 规格型号 */
    @Excel(name = "规格型号")
    private String specNo;

    /** 备件类型编码 */
    @Excel(name = "备件类型编码")
    private String partTypeCode;

    /** 备件仓库编码 */
    @Excel(name = "备件仓库编码")
    private String warehouseCode;

    /** 图片URL(JSON数组) */
    @Excel(name = "图片URL(JSON数组)")
    private String imageUrls;

    /** 库存总数 */
    @Excel(name = "库存总数")
    private Integer stockTotal;

    /** 关联资产JSON字符串 */
    private String associatedAssetsJson;

    /** 逻辑删除:0未删 1已删 */
    @Excel(name = "逻辑删除:0未删 1已删")
    private Integer isDelete;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    public void setPartNo(String partNo)
    {
        this.partNo = partNo;
    }

    public String getPartNo()
    {
        return partNo;
    }

    public String getOldPartNo()
    {
        return oldPartNo;
    }

    public void setOldPartNo(String oldPartNo)
    {
        this.oldPartNo = oldPartNo;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }

    public void setSpecNo(String specNo)
    {
        this.specNo = specNo;
    }

    public String getSpecNo()
    {
        return specNo;
    }

    public void setPartTypeCode(String partTypeCode)
    {
        this.partTypeCode = partTypeCode;
    }

    public String getPartTypeCode()
    {
        return partTypeCode;
    }

    public void setWarehouseCode(String warehouseCode)
    {
        this.warehouseCode = warehouseCode;
    }

    public String getWarehouseCode()
    {
        return warehouseCode;
    }

    public String getImageUrls() {
        return imageUrls;
    }

    public void setImageUrls(String imageUrls) {
        this.imageUrls = imageUrls;
    }


    public void setIsDelete(Integer isDelete)
    {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete()
    {
        return isDelete;
    }

    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt)
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt()
    {
        return updatedAt;
    }

    public void setStockTotal(Integer stockTotal)
    {
        this.stockTotal = stockTotal;
    }

    public Integer getStockTotal()
    {
        return stockTotal;
    }

    public String getAssociatedAssetsJson()
    {
        return associatedAssetsJson;
    }

    public void setAssociatedAssetsJson(String associatedAssetsJson)
    {
        this.associatedAssetsJson = associatedAssetsJson;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("partNo", getPartNo())
                .append("name", getName())
                .append("specNo", getSpecNo())
                .append("partTypeCode", getPartTypeCode())
                .append("warehouseCode", getWarehouseCode())
                .append("imageUrls", getImageUrls())
                .append("isDelete", getIsDelete())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())
                .toString();
    }
}
